package com.officegame.db.main;


import com.officegame.db.dao.DAOFactory;
import com.officegame.db.dao.IPlayerDAO;
import com.officegame.db.entities.Player;

public class Program {
	public static void main(String[] args) {
		DAOFactory daoFactory = DAOFactory.getDAOFactory(DAOFactory.MYSQL_DAO);
		IPlayerDAO playerDAO = daoFactory.getPlayerDAO();
		
		Player tys = playerDAO.read(1l);
		tys.setName("Mykhailo");
		playerDAO.persist(tys);
		
		Player tysNew = playerDAO.read(1l);
		System.out.println(tysNew);
	}
}
